#!/bin/sh
if [ `whoami` != 'root' ]; then
	echo "Please run this program as root (type: sudo $0)"
	exit 1
fi
echo "Running MYSQL tests..."
java -cp server.jar:junit-4.1.jar:mysql-connector-java-5.0.4-bin.jar org.junit.runner.JUnitCore server.MYSQLTest | grep -i -E "OK|Failures"
echo "Running IPTables tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.IPTablesTest 2> /dev/null | grep -i -E "OK |Failures"
echo "Running Commands tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.CommandsTest | grep -i -E "OK |Failures"
echo "Running ConfigurationManager tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.ConfigurationManagerTest 2> /dev/null | grep -i -E "OK|Failures"
echo "Running GlobalLog tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.GlobalLogTest | grep -i -E "OK|Failures"
echo "Running Password tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.PasswordTest | grep -i -E "OK|Failures"
echo "Running Protocol tests..."
java -cp server.jar:junit-4.1.jar org.junit.runner.JUnitCore server.ProtocolTest| grep -i -E "OK|Failures"
